<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>datalist元素</title>
</head>
<body>
<form>
  <input list="productList">
  <datalist id="productList">
    <option value="苹果">
    <option value="香蕉">
    <option value="梨子">
    <option value="火龙果">
  </datalist>
</form>
</body>
</html>